import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex);
const store = new Vuex.Store({
    state:{
        userinfo:{}
    },
    mutations:{
        setUser:function (state,obj) {
            state.userinfo = obj;
        }
    },
    actions:{
        changeUser:function (context,obj) {
            context.commit('setUser',obj)
        }
    }
});

export default store;
